<?php
// +----------------------------------------------------------------------
// | Author: derek <693472824@qq.com> <http://www.bloveambition.com/>
// +----------------------------------------------------------------------

namespace Blovex4\Model;
use Think\Model\ViewModel;

/**
 * 小哥-站点模型层
 * derek <693472824@qq.com>
 */
class WorkerSiteViewModel extends ViewModel {

    protected $viewFields = array(
            
        'Site'   =>  array(
                            'site_name',
                            '_type'=>'RIGHT'
        ),
            
        'Worker'   =>  array(
                            'worker_id', 'account', 'name', 'eid', 'id_number', 'telphone', 'job', 'profession',
                            'sex', 'birthday', 'province', 'city', 'site_id', 'att_id', 'member_type', 'referee', 
                            'training_time', 'training_id', 'status', 'balance', 'work_year', 'avg_hour', 'orders_sum',
                            'description',
                            '_on'=>'Site.site_id=Worker.site_id',
                            '_type'=>'LEFT',
        ),
            
        'Attachment'    =>  array(
                            'fullpath',
                            '_on'=>'Worker.att_id = Attachment.att_id'
                
        ),
    );
}